#pragma once

#include "../umlmodel_global.h"

#include "UMLBehaviorDiagram.h"
#include "UMLDiagram.h"
#include "UMLInteractionDiagramKind.h"

namespace uml {
class Interaction;

/// <summary>
/// UMLInteractionDiagram
/// Shows an Interaction and its elements.  Also see Annex A.
/// </summary>
class UMLMODEL_EXPORT UMLInteractionDiagram : public UMLDiagram, public UMLBehaviorDiagram {

public: // Constructors and destructors
    explicit UMLInteractionDiagram(const QString& umlType="uml::UMLInteractionDiagram");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// modelElement getter
    /// Restricts UMLInteractionDiagrams to showing Interactions.
    /// </summary>
    shared_ptr<Interaction> modelElement() const;

    /// <summary>
    /// modelElement setter
    /// Restricts UMLInteractionDiagrams to showing Interactions.
    /// </summary>
    void setModelElement(shared_ptr<Interaction> value);

    /// <summary>
    /// kind getter
    /// Indicates how an Interaction shall be shown.
    /// </summary>
    UMLInteractionDiagramKind kind() const;

    /// <summary>
    /// kind setter
    /// Indicates how an Interaction shall be shown.
    /// </summary>
    void setKind(UMLInteractionDiagramKind value);

    /// <summary>
    /// isLifelineDashed getter
    /// Indicates whether lifelines on the diagram shall be rendered as dashed.
    /// </summary>
    bool isLifelineDashed() const;

    /// <summary>
    /// isLifelineDashed setter
    /// Indicates whether lifelines on the diagram shall be rendered as dashed.
    /// </summary>
    void setIsLifelineDashed(bool value);

private: // Fields
    /// <summary>
    /// modelElement
    /// Restricts UMLInteractionDiagrams to showing Interactions.
    /// </summary>
    shared_ptr<Interaction> modelElement_;

    /// <summary>
    /// kind
    /// Indicates how an Interaction shall be shown.
    /// </summary>
    UMLInteractionDiagramKind kind_ = UMLInteractionDiagramKind::ksequence;

    /// <summary>
    /// isLifelineDashed
    /// Indicates whether lifelines on the diagram shall be rendered as dashed.
    /// </summary>
    const static bool isLifelineDashed_default_;
    bool isLifelineDashed_= isLifelineDashed_default_;

};

} // namespace uml
